﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TXTD.Admin.Data.Entitys.System
{
    [Table("SYS_USER_REFRESH_TOKEN")]
    public class SysUserRefreshToken : BaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        [Column("USER_REFRESH_TOKEN_ID")]
        [MaxLength(32)]
        public string UserRefreshTokenId { get; set; } = Guid.NewGuid().ToString("N");

        /// <summary>
        /// 用户id
        /// </summary>
        [Column("USER_ID")]
        [MaxLength(32)]
        public string UserId { get; set; }

        /// <summary>
        /// 刷新token
        /// </summary>
        [Column("TOKEN")]
        [MaxLength(8000)]
        public string Token { get; set; }

        /// <summary>
        /// 是否已使用
        /// </summary>
        [Column("IS_USED")]
        public bool IsUsed { get; set; } = false;
    }
}
